<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.onlineMIS.ORM.entity.headQ.barcodeGentor.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>禧乐仓连锁店管理信息系统</title>
<script>

</script>
</head>
<body>
	<script>
function save(){
	if ( $('#updateForm').form('validate')){
	    var params=$("#updateForm").serialize();
    	$.post("financeHQJSON!createUpdateFinanceCategory",params, updateBKProcess,"json");	
	}
}
function updateBKProcess(data){
	var returnCode = data.returnCode;
	if (returnCode != SUCCESS)
		 $.messager.alert('警告', data.message, 'warning');
	else {
		$.messager.alert('提示', data.message, 'info');
		$.modalDialog.handler.dialog('close');
		$("#dataGrid").datagrid('reload');
	}		
}
function cancel(){
	$.modalDialog.handler.dialog('close');
}

</script>
	<s:form id="updateForm" name="updateForm" method="post"
		theme="simple" cssClass="easyui-form">
		<table width="90%" border="0" style="position:relative;top:15px;left:20px;">
		    
			<tr class="InnerTableContent">
				<td width="25%" height="40" align="center"><span style="color:red">*</span><strong>账目名字 :</strong></td>
				<td><s:hidden name="formBean.fc.id" />
						<input name="formBean.fc.itemName" id="itemName"  style="width:250px;" class="easyui-textbox" data-options="prompt:'请输入账目名字!'"  value="<s:property value="formBean.fc.itemName"/>"/>
						
						</td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center" height="40"><strong>当前账目 :</strong></td>
				<td>
					<input name="formBean.fcVo.acumulateAmt" id="acumulateAmt" style="width:250px;" class="easyui-textbox"  readonly="true"  value="<s:property value="formBean.fcVo.acumulateAmt" />"/>
				</td>
			</tr>
			<s:if test="formBean.fc.id != 0">
			<tr class="InnerTableContent">
				<td align="center" height="40"><span style="color:red">*</span><strong>账目初始金额:</strong></td>
				<td>
					
						<s:textfield id="initialAmt" name="formBean.fc.initialAmt" style="width:250px;" readonly="true"
						cssClass="easyui-numberbox" data-options="min:0,max:3000000" />
						（<span style="color:red">*</span>注意：账目初始金额一旦保存无法修改）
						</td>
			</tr>
			</s:if>
			<s:else>
				<tr class="InnerTableContent">
					<td align="center" height="40"><span style="color:red">*</span><strong>账目初始金额:</strong></td>
					<td>					
						<s:textfield id="initialAmt" name="formBean.fc.initialAmt" style="width:250px;"
						cssClass="easyui-numberbox" data-options="min:0,max:3000000" />
						（<span style="color:red">*</span>注意：账目初始金额一旦保存无法修改）
						</td>
			</tr>
			</s:else>
			<tr class="InnerTableContent">
				<td align="center" height="40"><strong>账目状态 :</strong></td>
				<td><s:select name="formBean.fc.status" id="status"
						cssClass="easyui-combobox" style="width:250px;"
						list="#{'0':'正常','1':'停用'}" listKey="key" listValue="value" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center" height="40"><strong>系统账目类型 :</strong></td>
				<td><s:select name="formBean.fc.type" id="type"
						cssClass="easyui-combobox" style="width:250px;"
						list="#{'0':'正常账户','3':'预收款账户','4':'应收账户','7':'预付款账户','9':'应付账户'}" listKey="key" listValue="value" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center" height="40"><strong>账目类型 :</strong></td>
				<td><s:select name="formBean.fc.belongTo" id="belongTo"
						cssClass="easyui-combobox" style="width:250px;"
						list="#{'0':'系统','1':'总部'}" listKey="key" listValue="value" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center" height="40"><strong>账目归属 :</strong></td>
				<td><s:select name="formBean.fc.belongTo2" id="belongTo2"
						cssClass="easyui-combobox" style="width:250px;"
						list="#{'0':'千禧','1':'禧乐仓'}" listKey="key" listValue="value" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center" height="40"><strong>账目排序 :</strong></td>
				<td><input class="easyui-numberspinner" name="formBean.fc.sort" style="width:250px;" data-options=" " value="<s:property value="formBean.fc.sort"/>"></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center" height="40"><strong>是否支持转账：</strong></td>
				<td><s:select name="formBean.fc.isTransferAccounts" id="isTransferAccounts"
						cssClass="easyui-combobox" style="width:250px;"
						list="#{'1':'是','0':'否'}" listKey="key" listValue="value" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center" height="40"><strong>备注信息：</strong></td>
				<td>
					<input name="formBean.fc.comment" id="comment" style="width:250px;"  class="easyui-textbox" value="<s:property value="formBean.fc.comment"/>"
													data-options="prompt:'请输入账目备注信息!'" />
				</td>
			</tr>

			<tr class="InnerTableContent">
				<td height="40"></td>
				<td><a onclick="save();"
					href="javascript:void(0);" data-options="iconCls:'icon-ok'" class="easyui-linkbutton">保存</a> <a
					onclick="cancel();" href="javascript:void(0);" data-options="iconCls:'icon-redo'"
					class="easyui-linkbutton">退出</a></td>
			</tr>
		</table>
	</s:form>


</body>
</html>